{% extends "wiki/base.html" %}
{% from "wiki/includes/sidebar_modules.html" import document_tools with context %}
{% set title = _('Select language | {document}')|f(document=document.title) %}
{% set crumbs = [(document.get_absolute_url(), document.title),
                 (None, _('Select language'))] %}
{% set meta = [('robots', 'noindex, nofollow')] %}

{% block content %}
  <div class="grid_9">
    <article id="select-locale">
      <h1>{{ _('Select a language to translate to:') }}</h1>
      <ul class="locales">
        {% for locale in untranslated_locales %}
          {% if locale[0] != settings.WIKI_DEFAULT_LANGUAGE %}
            <li><a href="{{ url('wiki.translate', locale=locale[0], document_slug=document.slug) }}">{{ locale[1] }} ({{ locale[0] }})</a></li>
          {% endif %}
        {% endfor %}
      </ul>
      <h3>{{ _('This document has already been translated to the following locales:') }}</h3>
      <ul class="locales">
        {% for locale in translated_locales %}
          <li><a href="{{ url('wiki.document_revisions', locale=locale[0], document_slug=document.slug) }}">{{ locale[1] }} ({{ locale[0] }})</a></li>
        {% endfor %}
      </ul>
    </article>
  </div>
{% endblock %}

{% block side_top %}
  {{ document_tools(document, document.parent, user, 'localize', settings) }}
{% endblock %}
